<?

	include("inc/config.inc.php");

	// Check we are HR!
	if ($_SESSION[role] != "HR")
		die ("Error 51 - User error - Please contact support.");

	$date = mysqli_real_escape_string($con,$_POST[date]);
	$name = mysqli_real_escape_string($con,$_POST[name]);
	$hid = mysqli_real_escape_string($con,$_POST[hid]);

	if ($_POST['new'] == "true")
		mysqli_query($conn, "INSERT INTO bankhols SET date='$date', name='$name'");
	else
		$result = mysqli_query($conn, "UPDATE bankhols SET date='$date', name='$name' WHERE hid='$hid'");
		

	header("Location:bhol.php");

?>
